using System;
using ZhCun.DbCore.Entitys;

namespace ZhCun.DBModel
{
	public partial class Sys_TokenCache : EntityBase
	{
		private System.String _LoginToken;
		/// <summary>
		/// LoginToken
		/// </summary>
		[Entity(ColumnName = CNLoginToken, IsPrimaryKey = true, IsNotNull = true)]
		public System.String LoginToken
		{
			get { return _LoginToken; }
			set
			{
				_LoginToken = value;
				base.SetFieldChanged(CNLoginToken) ;
			}
		}

		private System.String _UserId;
		/// <summary>
		/// UserId
		/// </summary>
		[Entity(ColumnName = CNUserId)]
		public System.String UserId
		{
			get { return _UserId; }
			set
			{
				_UserId = value;
				base.SetFieldChanged(CNUserId) ;
			}
		}

		private System.String _UserName;
		/// <summary>
		/// UserName
		/// </summary>
		[Entity(ColumnName = CNUserName, IsNotNull = true)]
		public System.String UserName
		{
			get { return _UserName; }
			set
			{
				_UserName = value;
				base.SetFieldChanged(CNUserName) ;
			}
		}

		private System.String _RoleId;
		/// <summary>
		/// RoleId
		/// </summary>
		[Entity(ColumnName = CNRoleId, IsNotNull = true)]
		public System.String RoleId
		{
			get { return _RoleId; }
			set
			{
				_RoleId = value;
				base.SetFieldChanged(CNRoleId) ;
			}
		}

		private System.String _LoginHost;
		/// <summary>
		/// LoginHost
		/// </summary>
		[Entity(ColumnName = CNLoginHost)]
		public System.String LoginHost
		{
			get { return _LoginHost; }
			set
			{
				_LoginHost = value;
				base.SetFieldChanged(CNLoginHost) ;
			}
		}

		private System.DateTime _LoginTime;
		/// <summary>
		/// LoginTime
		/// </summary>
		[Entity(ColumnName = CNLoginTime, IsNotNull = true)]
		public System.DateTime LoginTime
		{
			get { return _LoginTime; }
			set
			{
				_LoginTime = value;
				base.SetFieldChanged(CNLoginTime) ;
			}
		}

		private System.DateTime _ExpiresTime;
		/// <summary>
		/// ExpiresTime
		/// </summary>
		[Entity(ColumnName = CNExpiresTime, IsNotNull = true)]
		public System.DateTime ExpiresTime
		{
			get { return _ExpiresTime; }
			set
			{
				_ExpiresTime = value;
				base.SetFieldChanged(CNExpiresTime) ;
			}
		}

		private System.Int32 _ExpiresMinute;
		/// <summary>
		/// ExpiresMinute
		/// </summary>
		[Entity(ColumnName = CNExpiresMinute, IsNotNull = true)]
		public System.Int32 ExpiresMinute
		{
			get { return _ExpiresMinute; }
			set
			{
				_ExpiresMinute = value;
				base.SetFieldChanged(CNExpiresMinute) ;
			}
		}

		private System.DateTime? _AddTime;
		/// <summary>
		/// AddTime
		/// </summary>
		[Entity(ColumnName = CNAddTime)]
		public System.DateTime? AddTime
		{
			get { return _AddTime; }
			set
			{
				_AddTime = value;
				base.SetFieldChanged(CNAddTime) ;
			}
		}

		private System.DateTime? _LastTime;
		/// <summary>
		/// LastTime
		/// </summary>
		[Entity(ColumnName = CNLastTime)]
		public System.DateTime? LastTime
		{
			get { return _LastTime; }
			set
			{
				_LastTime = value;
				base.SetFieldChanged(CNLastTime) ;
			}
		}

		#region 字段名的定义
		public const string CNLoginToken = "LoginToken";
		public const string CNUserId = "UserId";
		public const string CNUserName = "UserName";
		public const string CNRoleId = "RoleId";
		public const string CNLoginHost = "LoginHost";
		public const string CNLoginTime = "LoginTime";
		public const string CNExpiresTime = "ExpiresTime";
		public const string CNExpiresMinute = "ExpiresMinute";
		public const string CNAddTime = "AddTime";
		public const string CNLastTime = "LastTime";
		#endregion

	}
}
